<?php


namespace app\admin\controller\virtual;


use think\Request;
use app\admin\model\RobotAction as RobotActModel;

class RobotAction
{
    public function getAct(Request $request)
    {
        $list = RobotActModel::li();
        return successJson("success",$list);
    }

    public function addAct(Request $request)
    {
        $id = $request->param("id");
        $text = $request->param("text","");
        $status = $request->param("status",0);

        $res = RobotActModel::up($id,$text,$status);
        if ($res){
            return failedJson("失败");
        }
        return successJson("success");
    }

}